package com.blog.study.study8;

import redis.clients.jedis.Jedis;

/**
 * 〈一句话功能简述〉<br>
 *
 * @author 未绪
 * @time 2017/12/7 16:51
 */
public class JedisDemo {

    public static final String HOST="192.168.88.129";
    public static final int PORT=6380;

    public static void main(String[] args) {
        Jedis jedis=new Jedis(HOST,PORT);
//        List<String> list= jedis.lrange("mylist",0,-1);
//        list.forEach((String str)->{
//            System.out.println(str);
//        });

        System.out.println(jedis.get("K1"));
        jedis.set("userName","张俊强");
        System.out.println(jedis.get("userName"));

        jedis.keys("*").forEach((String str)->System.out.println(str));


    }

}
